Skip to content

Upmerge master-1.21-lts into master-26-lts - #100

Open
rubensworks wants to merge 79 commits into
master-26-ltsfrom
upmerge/1.21-lts-to-26-lts
Open

rubensworks wants to merge 79 commits into
master-26-ltsfrom
upmerge/1.21-lts-to-26-lts

Conversation

@rubensworks

@rubensworks rubensworks commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Merges master-1.21-lts (up to #99) into master-26-lts, as one merge commit like the earlier upmerges. It carries all the scripting terminal work from #87 to #99.

Porting to 26.1.2

  • Rendering: GuiGraphics became GuiGraphicsExtractor, and render* became extract*, including the screen's background, labels and tooltip hooks.
    • The RenderSystem shader color calls and the Tesselator selection highlight are replaced by plain fills and the GUI_TEXT_HIGHLIGHT pipeline.
    • The z-translations for popups are dropped, as 26 orders draws itself. Tooltips go through setTooltipForNextFrame; the error tooltip keeps its custom positioner.
  • Colors: text and fill colors that had no alpha are now opaque (ARGB.opaque / RGBAToInt(..., 255)). Otherwise they would be invisible on 26.
  • Input: MouseButtonEvent, KeyEvent and CharacterEvent replace the raw ints.
    • The editor reads shift and Cmd/Ctrl from the events instead of the global keyboard state.
    • 26's Minecraft.hasControlDown() no longer means Cmd on macOS, so Ctrl+Home/End now uses hasControlDownWithQuirk(), which keeps the 1.21 behavior.
  • Keys: the editor shortcuts use the new KeyModifier.CONTROL_OR_COMMAND and the mod's main KeyMapping.Category. The lang key is now key.category.integratedscripting.main.
  • Helpers and renames: IModHelpers, Identifier and ConfigurablePropertyCommon replace the old helpers, ResourceLocation and ConfigurableProperty. Card evaluation lines are synced as List<Component>.
  • Tests:
    • The new game tests use CyclopsCore's @GameTest and are registered in getGameTestClasses.
    • The new unit tests are moved to JUnit 5.
    • @OnlyIn is removed from the two new packets; NeoForge 26 logs an error for it.
  • JEI: jei_version=29.5.0.28 is the newest JEI that runs on this branch's NeoForge (26.1.2.22-beta); later builds need 26.1.2.53 or newer.

Validation

  • build passes (161 unit tests) and runGameTestServer passes 28/28.
  • In-game with clientdevbridge on 26.1.2:
    • Editing: highlighting, line numbers, wrapping, auto-indent, bracket matching, drag and shift selection, undo/redo, comment toggle, move lines, Tab, scrolling.
    • Find and go to line: the bar, match highlighting and navigation.
    • Syntax errors: the gutter mark, the underline, the tooltip below the line with its arrow, and the scrollbar mark with its tooltip.
    • Completions and signatures: idContext.ops completions with colored types.
    • Script files: creating a script with + (it opens), the rename dialog with its warning, the delete dialog, the path tooltip, the open-folder tooltip, external edits showing in the open editor.
    • Other UI: the empty-editor hints, the card binding label and evaluation tooltip, focus mode (F12, Escape), JEI hidden in focus mode (with JEI 29.5.0.28 at runtime), toolbar tooltips with key names, the info book shortcuts section, and the Integrated Scripting category in Controls.
  • The info book key labels are already correct on 26. CyclopsCore #255 isn't in CyclopsCore's master-26-lts, and this branch doesn't need it.

Not changed

Escape while the delete dialog is open closes the whole screen, the same as on 1.21.

🤖 Generated with Claude Code

https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9

claude and others added 30 commits October 17, 2026 17:41
Editing reset the first visible row to the top, while the scrollbar
stayed in place. Only reset it when a new script is loaded, and clamp
the scroll position when the text shrinks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Only up and down arrow keys scrolled the editor, so typing, pressing
enter, home/end and pasting could move the cursor out of view. Scroll to
the cursor after every handled key or typed character, and allow the
cursor to be placed on the empty line after a trailing newline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Pressing a key the editor doesn't handle, such as tab or a function key,
unfocused it, so a following 'e' closed the terminal. Consume all keys
except escape while focused.

Typing only worked before because of this unfocusing: once the widget
stays focused, EditBox.charTyped consumes every character into its own
unused value. Handle characters without delegating to EditBox.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
String.split dropped trailing empty strings, so blank lines at the end of
a script were lost when sending it between client and server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Script error messages count lines from 1, so a 0-based gutter made them
off by one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The wrap width didn't account for the scrollbar, so long lines were
drawn underneath it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Both keys were consumed without doing anything. Move the cursor and the
viewport by one page instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Resizing the window, or changing the GUI scale, recreated the editor
without the open script. The next key press then replaced the whole
script with what was typed into the empty editor. Restore the open script
and cursor position when the screen is initialized again, and close the
removal dialog if it was open, as its widgets are removed as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
This also avoids binding variable cards to keywords.
This could happen in non-English languages.
On macOS, Cmd+Left/Right jumped by word, while native text fields use
Option+Left/Right for that, and Cmd+Left/Right to go to the start or end of
the line. The editor now follows these conventions on macOS, including
Option+Backspace to delete a word and Cmd+Up/Down to go to the start or end
of the script. Other platforms keep using Ctrl.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
When a selection continued below the last visible line, the highlight of
the hidden next line was drawn over the editor's bottom border.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The script editor claimed every mouse drag, even outside of it, so
spreading a held stack over inventory slots by dragging put the whole
stack in one slot. The editor now only claims drags it handles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
… line

The editor has room for part of a row below its last visible line.
Clicking or dragging there put the cursor on that hidden line, and the
cursor was drawn over the editor's bottom border. Such positions now go to
the last visible line instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Fix scripting terminal editor bugs (scroll, cursor, focus, sync)
Scripts are saved on every edit and right-click selected the whole
script, so a right-click followed by a single key press replaced and
saved the entire script, without any way to get it back.

Add a per-file undo history (ctrl+z, and ctrl+y or ctrl+shift+z to redo)
that groups consecutive typing, and stop selecting everything on
right-click.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
When the client synced a script, the server sent the same version back.
If the player typed in the meantime, this echo overwrote the newer
client version, which was then synced instead, losing the last
keystrokes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Scripts were flushed by truncating and rewriting the file, so the file
watcher could reload a partially written or empty script into memory and
send it to clients. Write to a temporary file outside the watched
directories and move it into place instead, keeping the permissions of
existing files and the default permissions for new ones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
When a script changed outside the editor, for example by editing the
file on disk, the open editor kept showing the old text, and the next
key press synced that old text back, discarding the external change.

Reload the active script when the server sends a newer version, as an
undoable edit that keeps the cursor position.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
When the file watcher reloaded a disk directory, it replaced the scripts
in memory with whatever was on disk at that moment. As it also triggers
on the server's own writes, it could run while a script was not written
yet, for example right after creating the directory of a new disk, which
made that script disappear. Concurrent reloads could also overwrite each
other.

Remember the contents last written or read for each file, only apply
files that changed outside of the mod, and don't let reloads, flushes and
script changes run at the same time.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Files created outside of the game did not always show up until another
file changed. Every reload cancelled and re-registered the directory
watchers, losing events that happened in between, and only directories
that already contained scripts were watched, so files in new, empty or
intermediate directories were missed.

Watch all directories of a disk before reading its files, keep existing
watchers registered, and clean up watchers of deleted directories.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Tab did nothing in the editor, so indenting code meant typing spaces one
by one. Make tab insert an indent, or indent all selected lines, and
shift+tab remove one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
A new line always started at the first column, so the indentation had to
be retyped on every line. Keep the indentation of the current line, and
indent one more level after an opening bracket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
In the small editor it was hard to see which bracket closes which block.
Highlight the bracket next to the cursor and its matching bracket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Finding something in a script meant scrolling through it in the small
editor. Ctrl+F opens a search bar below the editor to find text, and
Ctrl+G opens it to go to a line number, for example one from an error
message. The bar shows the current match and the number of matches, has
previous and next buttons (also Shift+Enter and Enter), highlights all
matches, and turns red when nothing matches. Escape closes it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Commenting out or reordering multiple lines meant editing every line by
hand. Add ctrl+/ to toggle line comments and alt+up/down to move the
current or selected lines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Dragging a selection beyond the top or bottom of the editor stopped at
the visible lines, so a selection could not be larger than the viewport.
The editor now keeps scrolling while a selection is held above or below
it, faster the further away the mouse is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Tab inserted a fixed 4 spaces, which is wide in the small editor, and
doesn't match every code style. Add a client option for the number of
spaces, defaulting to 2, which is common for JavaScript.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The editor actions were only available through keyboard shortcuts, which
players can't discover in-game. Add small buttons for undo, redo, find,
go to line and toggle comment next to the terminal title, whose tooltips
also show their shortcut. Long translations of the title are shortened
so they don't run under the buttons.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The shortcuts for undo, redo, find, go to line, toggle comment and moving
lines were hardcoded. They are now key mappings that can be changed in the
Controls settings, and the toolbar tooltips show the current key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
claude and others added 29 commits October 19, 2026 16:30
The tooltip of a syntax error was placed at the mouse, often covering the
line it describes. Like in other editors, it is now placed below all rows
of the line, or above them if there is no room, with an arrow pointing at
the column of the error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The scrollbar took as much width as an inventory scrollbar, leaving less
room for text in the small editor. It is now about half as wide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The red mark of a syntax error on the scrollbar was drawn over the
scrollbar handle, and gave no information when hovered. It is now drawn
below the handle, and hovering it shows the error message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
JEI drew its item list over the enlarged script editor. When JEI is
installed, the focus mode now claims the whole screen, so JEI hides it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
JEI keeps its bookmark and config buttons in the bottom corners of the
screen, which overlapped the enlarged script editor. The focus mode now
leaves a larger margin when JEI is installed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Creating a script with the + button left the previous script open, so the
new one had to be selected manually. It is now opened and focused.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Show syntax errors in the scripting terminal editor
…g-performance

Fix syntax highlighting and editor performance in the scripting terminal
…ew-script

# Conflicts:
#	src/main/java/org/cyclops/integratedscripting/inventory/container/ContainerTerminalScripting.java
Variable cards refer to scripts by path, so they stop working when their
script is renamed. The rename dialog now says so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The enlarged editor could only be toggled with its button. F12 now toggles
it too, as F11 is used by Minecraft for fullscreen, and keeps the editor
focused so typing can continue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…files

Add focus mode and script renaming to the scripting terminal
Add a button to open the scripts folder in the scripting terminal
…eate

Scripting terminal: code-aware line wrapping
…nding

Scripting terminal: only bind cards to top-level declarations
…ew-script

# Conflicts:
#	src/main/java/org/cyclops/integratedscripting/client/gui/container/ContainerScreenTerminalScripting.java
…x-clean/10-last-value

# Conflicts:
#	src/main/java/org/cyclops/integratedscripting/gametest/GameTestsScripts.java
Open new scripts after creating them in the terminal
Scripting terminal: show the last evaluation of the bound card
Completions could only be chosen with the keyboard. Clicking one now
inserts it, and scrolling on the list moves through it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Types in the completion list and signature hint were plain text. They are
now shown in the colors of their value types, as in tooltips, on a dark
background those colors are made for, with a neutral selection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
…/12-editor-polish

# Conflicts:
#	src/main/java/org/cyclops/integratedscripting/client/gui/component/input/WidgetTextArea.java
Scripting terminal: idContext.ops completion and signature hints
Scripting terminal: error tooltip, scrollbar and JEI polish
An empty drive added disk -1 to the network, which the scripting terminal
then showed as an available disk. Replacing a disk in a drive by another
one also kept the old disk in the network. Drives now only expose the
disk they contain.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
The empty editor now tells the player what to do next: insert a
Scripting Disk into a connected drive when there are no disks, click +
to create a script when the disk is empty, or select a script from the
list otherwise. The unusable editor and script list are also grayed out
more clearly. The create and open-folder buttons are hidden while there
are no disks, and the disk field no longer shows -1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
This includes the fix for incorrect key binding labels in info book
appendices, such as the ones in the editor shortcuts section.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018MRyTdV3fSV5Q5NPGep4q9
Fix the scripting terminal showing disk -1, and update CyclopsCore
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 39983592868

Coverage decreased (-5.2%) to 46.279%

Details

  • Coverage decreased (-5.2%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • 1301 coverage regressions across 19 files.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

1301 previously-covered lines in 19 files lost coverage.

Top 10 Files by Coverage Loss Lines Losing Coverage Coverage
org/cyclops/integratedscripting/client/gui/component/input/WidgetTextArea.java 583 0.0%
org/cyclops/integratedscripting/client/gui/container/ContainerScreenTerminalScripting.java 460 0.0%
org/cyclops/integratedscripting/inventory/container/ContainerTerminalScripting.java 86 41.64%
org/cyclops/integratedscripting/client/gui/component/input/WidgetDialog.java 37 0.0%
org/cyclops/integratedscripting/core/network/ScriptingData.java 34 82.0%
org/cyclops/integratedscripting/core/language/LanguageHandlerJavaScript.java 25 75.39%
org/cyclops/integratedscripting/client/gui/component/input/TextFieldHelperExtended.java 17 0.0%
org/cyclops/integratedscripting/api/language/ILanguageHandler.java 12 0.0%
org/cyclops/integratedscripting/network/packet/TerminalScriptingModifiedScriptPacket.java 9 30.77%
org/cyclops/integratedscripting/client/gui/image/ScriptImages.java 8 0.0%

Coverage Stats

Coverage Status
Relevant Lines: 4204
Covered Lines: 2110
Line Coverage: 50.19%
Relevant Branches: 1963
Covered Branches: 744
Branch Coverage: 37.9%
Branches in Coverage %: Yes
Coverage Strength: 19.96 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants